<%@ page language="java" import="java.util.*,com.hs.core.db.*,com.hs.core.utils.*,com.hs.pdms.utils.*,com.hs.pdms.model.*,com.hs.pdms.cache.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="spring" uri="/WEB-INF/spring.tld"%>
<% 
String filepath = SystemUtil.getClassLoaderRoot().getAbsolutePath(); 
PropertiesUtil util = new PropertiesUtil(filepath+"/pdms_config.properties");
String filesavepath = util.getValue("filepath");
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String pid = request.getParameter("pid");
DBMgr dbo = DBMgr.getDbUtilInst(request.getSession().getServletContext());
List booklist = dbo.queryList("select bookurl from PDMS_PREPAPER where id=?",new Object[]{pid});
String swfurl = basePath + "upload";
 
if(booklist.size()>0){
	Map data = (Map)booklist.get(0);
	String temp = (String)data.get("bookurl");
	swfurl += temp; 
}

%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">	
    <head> 
         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
        <style type="text/css" media="screen"> 
			html, body	{ height:100%; }
			body { margin:0; padding:0; overflow:auto; }   
			#flashContent { display:none; }
        </style>  
		<script type="text/javascript" src="<%=basePath %>pdfonline/js/flexpaper_flash.js"></script>
    </head> 
    <body> 
    	<div style="position:absolute;left:3px;right:3px;top:3px;bottom:3px">
	        <a id="viewerPlaceHolder" style="width:100%;height:98%;display:block"></a> 
	        <script type="text/javascript"> 
				var fp = new FlexPaperViewer(	
						 'FlexPaperViewer',
						 'viewerPlaceHolder', { config : {
						 SwfFile : '<%=swfurl%>',
						 Scale : 1, 
						 ZoomTransition : 'easeOut',
						 ZoomTime : 0.5,
						 ZoomInterval : 0.8,
						 FitPageOnLoad : true,
						 FitWidthOnLoad : true,
						 PrintEnabled : true,
						 FullScreenAsMaxWindow : false,
						 ProgressiveLoading : true,
						 MinZoomSize : 0.2,
						 MaxZoomSize : 5,
						 SearchMatchAll : false,
						 InitViewMode : 'Portrait',
						 
						 ViewModeToolsVisible : true,
						 ZoomToolsVisible : true,
						 NavToolsVisible : true,
						 CursorToolsVisible : true,
						 SearchToolsVisible : false,
  						
  						 localeChain: 'zh_CN'
						 }});
	        </script>
	           
        </div>
   </body> 
</html> 